import React, {useState, useEffect} from 'react';

function ProfilePage() {
  
  const [count, changeCount] = useState(0)

  useEffect(() => {
    setInterval(() => {
      // 组件挂载时开启定时器，一秒加一
      changeCount(count + 1)
    },1000)
  }, [])

  return (
    <div>{count}</div>
  );
}

export default ProfilePage;
